package stream;

import java.util.HashMap;
import java.util.Map;
import java.util.Optional;

public class OptionalTest {
    public static void main(String[] args) {
        Map<String,Object> map = new HashMap<>();
        map.put("name","liu");

        Optional<Object> name = Optional.ofNullable(map.get("name"));
        System.out.println(name.get());

    }
}
